.class public Lmyview/RefreshableView;
.super Landroid/widget/LinearLayout;
.source "RefreshableView.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lmyview/RefreshableView$RefreshListener;
    }
.end annotation


# static fields
.field private static final TAG:Ljava/lang/String; = "LILITH"


# instance fields
.field private bar:Landroid/widget/ProgressBar;

.field private downTextString:Ljava/lang/String;

.field private downTextView:Landroid/widget/TextView;

.field private isDragging:Z

.field private isRefreshEnabled:Z

.field private isRefreshing:Z

.field private lastX:I

.field private lastY:I

.field private mContext:Landroid/content/Context;

.field private refreshIndicatorView:Landroid/widget/ImageView;

.field private refreshListener:Lmyview/RefreshableView$RefreshListener;

.field private refreshTargetTop:I

.field private refreshTime:Ljava/lang/Long;

.field private refreshView:Landroid/view/View;

.field private releaseTextString:Ljava/lang/String;

.field private scroller:Landroid/widget/Scroller;

.field private timeTextView:Landroid/widget/TextView;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    const/4 v1, 0x0

    .line 57
    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 34
    const/16 v0, -0x3c

    iput v0, p0, Lmyview/RefreshableView;->refreshTargetTop:I

    .line 44
    const/4 v0, 0x0

    iput-object v0, p0, Lmyview/RefreshableView;->refreshTime:Ljava/lang/Long;

    .line 48
    iput-boolean v1, p0, Lmyview/RefreshableView;->isDragging:Z

    .line 50
    const/4 v0, 0x1

    iput-boolean v0, p0, Lmyview/RefreshableView;->isRefreshEnabled:Z

    .line 52
    iput-boolean v1, p0, Lmyview/RefreshableView;->isRefreshing:Z

    .line 58
    iput-object p1, p0, Lmyview/RefreshableView;->mContext:Landroid/content/Context;

    .line 60
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 2
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;

    .prologue
    const/4 v1, 0x0

    .line 62
    invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 34
    const/16 v0, -0x3c

    iput v0, p0, Lmyview/RefreshableView;->refreshTargetTop:I

    .line 44
    const/4 v0, 0x0

    iput-object v0, p0, Lmyview/RefreshableView;->refreshTime:Ljava/lang/Long;

    .line 48
    iput-boolean v1, p0, Lmyview/RefreshableView;->isDragging:Z

    .line 50
    const/4 v0, 0x1

    iput-boolean v0, p0, Lmyview/RefreshableView;->isRefreshEnabled:Z

    .line 52
    iput-boolean v1, p0, Lmyview/RefreshableView;->isRefreshing:Z

    .line 63
    iput-object p1, p0, Lmyview/RefreshableView;->mContext:Landroid/content/Context;

    .line 64
    invoke-direct {p0}, Lmyview/RefreshableView;->init()V

    .line 66
    return-void
.end method

.method private canScroll()Z
    .locals 7

    .prologue
    const/4 v4, 0x1

    const/4 v5, 0x0

    .line 300
    invoke-virtual {p0}, Lmyview/RefreshableView;->getChildCount()I

    move-result v3

    if-le v3, v4, :cond_3

    .line 301
    invoke-virtual {p0, v4}, Lmyview/RefreshableView;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    .line 302
    .local v0, "childView":Landroid/view/View;
    instance-of v3, v0, Landroid/widget/ListView;

    if-eqz v3, :cond_1

    move-object v3, v0

    .line 303
    check-cast v3, Landroid/widget/ListView;

    invoke-virtual {v3, v5}, Landroid/widget/ListView;->getChildAt(I)Landroid/view/View;

    move-result-object v3

    invoke-virtual {v3}, Landroid/view/View;->getTop()I

    move-result v2

    .local v2, "top":I
    move-object v3, v0

    .line 304
    check-cast v3, Landroid/widget/ListView;

    invoke-virtual {v3}, Landroid/widget/ListView;->getListPaddingTop()I

    move-result v1

    .line 305
    .local v1, "pad":I
    sub-int v3, v2, v1

    invoke-static {v3}, Ljava/lang/Math;->abs(I)I

    move-result v3

    const/4 v6, 0x3

    if-ge v3, v6, :cond_0

    .line 306
    check-cast v0, Landroid/widget/ListView;

    .end local v0    # "childView":Landroid/view/View;
    invoke-virtual {v0}, Landroid/widget/ListView;->getFirstVisiblePosition()I

    move-result v3

    if-nez v3, :cond_0

    move v3, v4

    .line 320
    .end local v1    # "pad":I
    .end local v2    # "top":I
    :goto_0
    return v3

    .restart local v1    # "pad":I
    .restart local v2    # "top":I
    :cond_0
    move v3, v5

    .line 309
    goto :goto_0

    .line 311
    .end local v1    # "pad":I
    .end local v2    # "top":I
    .restart local v0    # "childView":Landroid/view/View;
    :cond_1
    instance-of v3, v0, Landroid/widget/ScrollView;

    if-eqz v3, :cond_3

    .line 312
    check-cast v0, Landroid/widget/ScrollView;

    .end local v0    # "childView":Landroid/view/View;
    invoke-virtual {v0}, Landroid/widget/ScrollView;->getScrollY()I

    move-result v3

    if-nez v3, :cond_2

    move v3, v4

    .line 313
    goto :goto_0

    :cond_2
    move v3, v5

    .line 315
    goto :goto_0

    :cond_3
    move v3, v5

    .line 320
    goto :goto_0
.end method

.method private doMovement(I)V
    .locals 7
    .param p1, "moveY"    # I

    .prologue
    const/4 v6, 0x0

    .line 200
    iget-object v4, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    invoke-virtual {v4}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v3

    check-cast v3, Landroid/widget/LinearLayout$LayoutParams;

    .line 201
    .local v3, "lp":Landroid/widget/LinearLayout$LayoutParams;
    if-lez p1, :cond_0

    .line 203
    iget v4, v3, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    int-to-float v0, v4

    .line 204
    .local v0, "f1":F
    int-to-float v4, p1

    const v5, 0x3e99999a    # 0.3f

    mul-float v1, v4, v5

    .line 205
    .local v1, "f2":F
    add-float v4, v0, v1

    float-to-int v2, v4

    .line 207
    .local v2, "i":I
    iput v2, v3, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    .line 209
    iget-object v4, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    invoke-virtual {v4, v3}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 210
    iget-object v4, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    invoke-virtual {v4}, Landroid/view/View;->invalidate()V

    .line 211
    invoke-virtual {p0}, Lmyview/RefreshableView;->invalidate()V

    .line 213
    .end local v0    # "f1":F
    .end local v1    # "f2":F
    .end local v2    # "i":I
    :cond_0
    iget-object v4, p0, Lmyview/RefreshableView;->timeTextView:Landroid/widget/TextView;

    invoke-virtual {v4, v6}, Landroid/widget/TextView;->setVisibility(I)V

    .line 214
    iget-object v4, p0, Lmyview/RefreshableView;->refreshTime:Ljava/lang/Long;

    if-eqz v4, :cond_1

    .line 215
    iget-object v4, p0, Lmyview/RefreshableView;->refreshTime:Ljava/lang/Long;

    invoke-direct {p0, v4}, Lmyview/RefreshableView;->setRefreshTime(Ljava/lang/Long;)V

    .line 217
    :cond_1
    iget-object v4, p0, Lmyview/RefreshableView;->downTextView:Landroid/widget/TextView;

    invoke-virtual {v4, v6}, Landroid/widget/TextView;->setVisibility(I)V

    .line 219
    iget-object v4, p0, Lmyview/RefreshableView;->refreshIndicatorView:Landroid/widget/ImageView;

    invoke-virtual {v4, v6}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 220
    iget-object v4, p0, Lmyview/RefreshableView;->bar:Landroid/widget/ProgressBar;

    const/16 v5, 0x8

    invoke-virtual {v4, v5}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 221
    iget v4, v3, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    if-lez v4, :cond_2

    .line 222
    iget-object v4, p0, Lmyview/RefreshableView;->downTextView:Landroid/widget/TextView;

    const v5, 0x7f09008c

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(I)V

    .line 223
    iget-object v4, p0, Lmyview/RefreshableView;->refreshIndicatorView:Landroid/widget/ImageView;

    const v5, 0x7f020106

    invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 229
    :goto_0
    return-void

    .line 225
    :cond_2
    iget-object v4, p0, Lmyview/RefreshableView;->downTextView:Landroid/widget/TextView;

    const v5, 0x7f09008b

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(I)V

    .line 226
    iget-object v4, p0, Lmyview/RefreshableView;->refreshIndicatorView:Landroid/widget/ImageView;

    const v5, 0x7f020105

    invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_0
.end method

.method private fling()V
    .locals 4

    .prologue
    .line 144
    iget-object v1, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    invoke-virtual {v1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout$LayoutParams;

    .line 145
    .local v0, "lp":Landroid/widget/LinearLayout$LayoutParams;
    const-string v1, "LILITH"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "fling()"

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v3, v0, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 146
    iget v1, v0, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    if-lez v1, :cond_0

    .line 147
    invoke-direct {p0}, Lmyview/RefreshableView;->refresh()V

    .line 151
    :goto_0
    return-void

    .line 149
    :cond_0
    invoke-direct {p0}, Lmyview/RefreshableView;->returnInitState()V

    goto :goto_0
.end method

.method private init()V
    .locals 4

    .prologue
    .line 70
    new-instance v1, Landroid/widget/Scroller;

    iget-object v2, p0, Lmyview/RefreshableView;->mContext:Landroid/content/Context;

    invoke-direct {v1, v2}, Landroid/widget/Scroller;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lmyview/RefreshableView;->scroller:Landroid/widget/Scroller;

    .line 73
    iget-object v1, p0, Lmyview/RefreshableView;->mContext:Landroid/content/Context;

    invoke-static {v1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v1

    const v2, 0x7f0300bd

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    iput-object v1, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    .line 75
    iget-object v1, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    const v2, 0x7f0c0376

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, p0, Lmyview/RefreshableView;->refreshIndicatorView:Landroid/widget/ImageView;

    .line 77
    iget-object v1, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    const v2, 0x7f0c036c

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ProgressBar;

    iput-object v1, p0, Lmyview/RefreshableView;->bar:Landroid/widget/ProgressBar;

    .line 79
    iget-object v1, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    const v2, 0x7f0c0377

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lmyview/RefreshableView;->downTextView:Landroid/widget/TextView;

    .line 81
    iget-object v1, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    const v2, 0x7f0c0378

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lmyview/RefreshableView;->timeTextView:Landroid/widget/TextView;

    .line 83
    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v1, -0x1

    iget v2, p0, Lmyview/RefreshableView;->refreshTargetTop:I

    neg-int v2, v2

    invoke-direct {v0, v1, v2}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    .line 84
    .local v0, "lp":Landroid/widget/LinearLayout$LayoutParams;
    iget v1, p0, Lmyview/RefreshableView;->refreshTargetTop:I

    iput v1, v0, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    .line 85
    const/16 v1, 0x11

    iput v1, v0, Landroid/widget/LinearLayout$LayoutParams;->gravity:I

    .line 86
    iget-object v1, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    invoke-virtual {p0, v1, v0}, Lmyview/RefreshableView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 87
    iget-object v1, p0, Lmyview/RefreshableView;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f09008b

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lmyview/RefreshableView;->downTextString:Ljava/lang/String;

    .line 88
    iget-object v1, p0, Lmyview/RefreshableView;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f09008c

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lmyview/RefreshableView;->releaseTextString:Ljava/lang/String;

    .line 89
    return-void
.end method

.method private refresh()V
    .locals 5

    .prologue
    const/16 v3, 0x8

    const/4 v4, 0x0

    .line 164
    iget-object v2, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    invoke-virtual {v2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout$LayoutParams;

    .line 165
    .local v1, "lp":Landroid/widget/LinearLayout$LayoutParams;
    iget v0, v1, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    .line 166
    .local v0, "i":I
    iget-object v2, p0, Lmyview/RefreshableView;->refreshIndicatorView:Landroid/widget/ImageView;

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 167
    iget-object v2, p0, Lmyview/RefreshableView;->bar:Landroid/widget/ProgressBar;

    invoke-virtual {v2, v4}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 168
    iget-object v2, p0, Lmyview/RefreshableView;->timeTextView:Landroid/widget/TextView;

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setVisibility(I)V

    .line 169
    iget-object v2, p0, Lmyview/RefreshableView;->downTextView:Landroid/widget/TextView;

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setVisibility(I)V

    .line 170
    iget-object v2, p0, Lmyview/RefreshableView;->scroller:Landroid/widget/Scroller;

    rsub-int/lit8 v3, v0, 0x0

    invoke-virtual {v2, v4, v0, v4, v3}, Landroid/widget/Scroller;->startScroll(IIII)V

    .line 171
    invoke-virtual {p0}, Lmyview/RefreshableView;->invalidate()V

    .line 172
    iget-object v2, p0, Lmyview/RefreshableView;->refreshListener:Lmyview/RefreshableView$RefreshListener;

    if-eqz v2, :cond_0

    .line 173
    iget-object v2, p0, Lmyview/RefreshableView;->refreshListener:Lmyview/RefreshableView$RefreshListener;

    invoke-interface {v2, p0}, Lmyview/RefreshableView$RefreshListener;->onRefresh(Lmyview/RefreshableView;)V

    .line 174
    const/4 v2, 0x1

    iput-boolean v2, p0, Lmyview/RefreshableView;->isRefreshing:Z

    .line 176
    :cond_0
    return-void
.end method

.method private returnInitState()V
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 157
    iget-object v2, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    invoke-virtual {v2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout$LayoutParams;

    .line 158
    .local v1, "lp":Landroid/widget/LinearLayout$LayoutParams;
    iget v0, v1, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    .line 159
    .local v0, "i":I
    iget-object v2, p0, Lmyview/RefreshableView;->scroller:Landroid/widget/Scroller;

    iget v3, p0, Lmyview/RefreshableView;->refreshTargetTop:I

    invoke-virtual {v2, v4, v0, v4, v3}, Landroid/widget/Scroller;->startScroll(IIII)V

    .line 160
    invoke-virtual {p0}, Lmyview/RefreshableView;->invalidate()V

    .line 161
    return-void
.end method

.method private setRefreshText(Ljava/lang/String;)V
    .locals 0
    .param p1, "time"    # Ljava/lang/String;

    .prologue
    .line 101
    return-void
.end method

.method private setRefreshTime(Ljava/lang/Long;)V
    .locals 0
    .param p1, "time"    # Ljava/lang/Long;

    .prologue
    .line 246
    return-void
.end method


# virtual methods
.method public computeScroll()V
    .locals 4

    .prologue
    .line 184
    iget-object v3, p0, Lmyview/RefreshableView;->scroller:Landroid/widget/Scroller;

    invoke-virtual {v3}, Landroid/widget/Scroller;->computeScrollOffset()Z

    move-result v3

    if-eqz v3, :cond_0

    .line 185
    iget-object v3, p0, Lmyview/RefreshableView;->scroller:Landroid/widget/Scroller;

    invoke-virtual {v3}, Landroid/widget/Scroller;->getCurrY()I

    move-result v0

    .line 186
    .local v0, "i":I
    iget-object v3, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    invoke-virtual {v3}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v2

    check-cast v2, Landroid/widget/LinearLayout$LayoutParams;

    .line 187
    .local v2, "lp":Landroid/widget/LinearLayout$LayoutParams;
    iget v3, p0, Lmyview/RefreshableView;->refreshTargetTop:I

    invoke-static {v0, v3}, Ljava/lang/Math;->max(II)I

    move-result v1

    .line 188
    .local v1, "k":I
    iput v1, v2, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    .line 189
    iget-object v3, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    invoke-virtual {v3, v2}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 190
    iget-object v3, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    invoke-virtual {v3}, Landroid/view/View;->invalidate()V

    .line 191
    invoke-virtual {p0}, Lmyview/RefreshableView;->invalidate()V

    .line 193
    .end local v0    # "i":I
    .end local v1    # "k":I
    .end local v2    # "lp":Landroid/widget/LinearLayout$LayoutParams;
    :cond_0
    return-void
.end method

.method public finishRefresh()V
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 252
    const-string v2, "LILITH"

    const-string v3, "\u93b5\u0446\ue511\u6d5c?====finishRefresh"

    invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 253
    iget-object v2, p0, Lmyview/RefreshableView;->refreshView:Landroid/view/View;

    invoke-virtual {v2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout$LayoutParams;

    .line 254
    .local v1, "lp":Landroid/widget/LinearLayout$LayoutParams;
    iget v0, v1, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    .line 255
    .local v0, "i":I
    iget-object v2, p0, Lmyview/RefreshableView;->refreshIndicatorView:Landroid/widget/ImageView;

    invoke-virtual {v2, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 256
    iget-object v2, p0, Lmyview/RefreshableView;->timeTextView:Landroid/widget/TextView;

    invoke-virtual {v2, v4}, Landroid/widget/TextView;->setVisibility(I)V

    .line 257
    iget-object v2, p0, Lmyview/RefreshableView;->scroller:Landroid/widget/Scroller;

    iget v3, p0, Lmyview/RefreshableView;->refreshTargetTop:I

    invoke-virtual {v2, v4, v0, v4, v3}, Landroid/widget/Scroller;->startScroll(IIII)V

    .line 258
    invoke-virtual {p0}, Lmyview/RefreshableView;->invalidate()V

    .line 259
    iput-boolean v4, p0, Lmyview/RefreshableView;->isRefreshing:Z

    .line 260
    return-void
.end method

.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 4
    .param p1, "e"    # Landroid/view/MotionEvent;

    .prologue
    .line 270
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    .line 271
    .local v0, "action":I
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F

    move-result v3

    float-to-int v2, v3

    .line 272
    .local v2, "y":I
    packed-switch v0, :pswitch_data_0

    .line 295
    :cond_0
    :goto_0
    :pswitch_0
    const/4 v3, 0x0

    :goto_1
    return v3

    .line 274
    :pswitch_1
    iput v2, p0, Lmyview/RefreshableView;->lastY:I

    goto :goto_0

    .line 279
    :pswitch_2
    iget v3, p0, Lmyview/RefreshableView;->lastY:I

    sub-int v1, v2, v3

    .line 282
    .local v1, "m":I
    iput v2, p0, Lmyview/RefreshableView;->lastY:I

    .line 283
    const/4 v3, 0x6

    if-le v1, v3, :cond_0

    invoke-direct {p0}, Lmyview/RefreshableView;->canScroll()Z

    move-result v3

    if-eqz v3, :cond_0

    .line 284
    const/4 v3, 0x1

    goto :goto_1

    .line 272
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 4
    .param p1, "event"    # Landroid/view/MotionEvent;

    .prologue
    .line 108
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F

    move-result v2

    float-to-int v1, v2

    .line 111
    .local v1, "y":I
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v2

    packed-switch v2, :pswitch_data_0

    .line 135
    :goto_0
    const/4 v2, 0x1

    return v2

    .line 114
    :pswitch_0
    iput v1, p0, Lmyview/RefreshableView;->lastY:I

    goto :goto_0

    .line 118
    :pswitch_1
    const-string v2, "LILITH"

    const-string v3, "ACTION_MOVE"

    invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 120
    iget v2, p0, Lmyview/RefreshableView;->lastY:I

    sub-int v0, v1, v2

    .line 121
    .local v0, "m":I
    const/4 v2, 0x6

    if-ge v0, v2, :cond_0

    const/4 v2, -0x1

    if-gt v0, v2, :cond_1

    :cond_0
    iget-boolean v2, p0, Lmyview/RefreshableView;->isDragging:Z

    if-nez v2, :cond_2

    .line 122
    :cond_1
    invoke-direct {p0, v0}, Lmyview/RefreshableView;->doMovement(I)V

    .line 125
    :cond_2
    iput v1, p0, Lmyview/RefreshableView;->lastY:I

    goto :goto_0

    .line 129
    .end local v0    # "m":I
    :pswitch_2
    const-string v2, "LILITH"

    const-string v3, "ACTION_UP"

    invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 131
    invoke-direct {p0}, Lmyview/RefreshableView;->fling()V

    goto :goto_0

    .line 111
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_1
    .end packed-switch
.end method

.method public setRefreshEnabled(Z)V
    .locals 0
    .param p1, "b"    # Z

    .prologue
    .line 232
    iput-boolean p1, p0, Lmyview/RefreshableView;->isRefreshEnabled:Z

    .line 233
    return-void
.end method

.method public setRefreshListener(Lmyview/RefreshableView$RefreshListener;)V
    .locals 0
    .param p1, "listener"    # Lmyview/RefreshableView$RefreshListener;

    .prologue
    .line 236
    iput-object p1, p0, Lmyview/RefreshableView;->refreshListener:Lmyview/RefreshableView$RefreshListener;

    .line 237
    return-void
.end method
